package org.example.struct.array;

/**
 * @author liyishan
 * @date 2024/6/12 17:23
 * @apiNote
 */

public class Test002806AccountBalanceAfterPurchase {

    public int accountBalanceAfterPurchase(int purchaseAmount) {
        int r = purchaseAmount % 10;
        if (r < 5){
            purchaseAmount -= r;
        }else{
            purchaseAmount += 10 - r;
        }
        return 100 - purchaseAmount;
    }
}
